<?php
   session_start();
   if ($_SESSION['login'] == true)   
       header("Location: index.php?pageId=1")
?>
This is login Page <br  />
<?php echo $_SESSION["statusMsg"]?>
<form action="<?=$admin_url?>/action.php?pageId=0" method="post">
  <input type="text" name="userId" id="userid"  /> <br  />
  <input type="submit" value="login" name="login"  />
</form>